package com.xxx.controller;

import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author blijojo
 * @date 2021/5/27
 */
@RestController
@RefreshScope
@Slf4j
public class ConfigClientController {

    @Value("${name}")
    private String name;

    @GetMapping("/name")
    public String name() {
        log.info("name:{}", name);
        return "name:" + name;
    }

}
